version 14.0
log using "C:\Users\eddie\Desktop\Final\DATA\replication\log.log", replace


*     ***************************************************************** *
*     ***************************************************************** *
*     File-Name:  do                                                    *
*     Date:       March 2019                                            *
*     Author:     Eddie Hearn                                           *
*     Purpose:    Hearn_JJPS_2019                                       *
*     Input File: DATA.dta                                              *
*     Output File: log.log                                              *
*     Data Output: None                                                 *
*     Program:      Stata 14                                            *
*     Machine:    (Lenovo)Office                                        *
*     ****************************************************************  *
*     ****************************************************************  *


use "C:\Users\eddie\Desktop\Final\DATA\Replication\DATA.dta" 

recode q3a1 q3a2 q3b1 q3b2 q8  (99 = 3)
recode q13 (99=.)

gen ego1 = q3a1 
gen socio2 = q3a2 
gen socio1 = q3b1 
gen ego2 = q3b2

gen EXP_Group = 1 if ego1==1|ego1==2|ego1==3
recode EXP_Group (.=0)

gen female = q1-1
gen age = q2
gen conserv = q10
gen collgrad = 1 if q11>8
recode collgrad (.=0)

gen employ = q12 
gen unemployed = 1 if employ ==7
recode unemployed (.=0)

gen income = q13 

gen ego = ego1
replace ego= ego2 if ego==.

gen socio = socio1
replace socio= socio2 if socio==.

gen trade = q8 
gen protect = 1 if trade==1
replace protect=2 if trade==3
replace protect =3  if trade==2

gen sociotropic = 3 if socio==1
replace sociotropic =2 if socio==3
replace sociotropic = 1 if socio==2

gen egotropic = 3 if ego==1
replace egotropic =2 if ego==3
replace egotropic = 1 if ego==2



******************************************************************
*     Randomization Check                                        *
******************************************************************

probit EXP_Group respid 


probit EXP_Group female age conserv collgrad income




******************************************************************
*     H1                                                       *
******************************************************************

tab ego1
tab ego2

ssc inst tab_chi 
tabchii 168 25 308 \ 204 35 260, a


******************************************************************
*     H2                                                         *
******************************************************************

tab socio1
tab socio2


tabchii 234 48 217 \ 258 38 205, a

******************************************************************
*     Trade Attitudes   Ordered                                  *
******************************************************************

oprobit protect collgrad income age female conserv unemployed


oprobit protect collgrad income age female conserv unemployed sociotropic 


oprobit protect collgrad income age female conserv unemployed sociotropic egotropic



******************************************************************
*     Trade Attitudes   Multinomial                              *
******************************************************************

mlogit protect collgrad income age female conserv unemployed


mlogit protect collgrad income age female conserv unemployed sociotropic


mlogit protect collgrad income age female conserv unemployed sociotropic egotropic



